<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsps/common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>资金账户开户</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href='<c:url value="/css/application.css"/>'>
	<link rel="stylesheet" type="text/css" href='<c:url value="/css/list.css"/>'>
	<link rel="stylesheet" type="text/css" href='<c:url value="/css/form.css"/>'>

	<script type="text/javascript">
		function back(idcardno){
			location.href = 'clientMgr?act=loadPagedClients&idcard_no='+idcardno;
		}	
		
		function validateFrm(){
			with(document.forms[0]){
				if(account_pwd.value == ''){
					alert("请设置密码！");
					account_pwd.focus();
					return false;
				}
				if(account_repwd.value == ''){
					alert("请输入确认密码！");
					account_repwd.focus();
					return false;
				}
				if(account_pwd.value.length !=6){
					alert("请设置6位密码！");
					account_pwd.focus();
					return false;
				}
				if(account_pwd.value != account_repwd.value){
					alert("两次输入的密码不一致，请重新输入！");
					account_pwd.focus();
					return false;
				}
			}
			return true;
		}
		
	</script>
<style type="text/css">
	body {
			background:url(pics/bg.jpg);
			-webkit-background-size: cover;
			-moz-background-size: cover;
			background-size: cover;
		}
</style>
  </head>
  
  <body>
    <div id="wrapper">
    	<div id="f_title">资金账户开户</div>
	    <form action="<c:url value="/accountMgr?act=create"/>"  method="post" onSubmit="return validateFrm();">
	    	<input type="hidden" name="client_no" value="${client.clientNo }">
	    	<div class="f_row">
    			<span>客户编号：</span><span>${client.clientNo}</span>
   		 	</div>
    		<div class="f_row">
    			<span>客户身份证号：</span><span>${client.idcardNo }</span>
    		</div>
	    	<div class="f_row">
	    		<span>设置密码：</span>
	    		<input type="password" name="account_pwd">
	    	</div>	
	    	<div class="f_row">
	    		<span>确认密码：</span>
	    		<input type="password" name="account_repwd">
	    	</div>
	    	<div class="f_row">
	    		<span>账户资金：</span>
	    		<input type="text" name="account_amount" value="0">
	    	</div>
	    	<div class="f_row">
	    		<span>账户状态：</span>
				<select name="account_status">	
					<option value="A">正常</option>
					<option value="B">冻结</option>
				</select>
	    	</div>
	    	<div class="f_row">
    			<br/>
    			<input type="submit" value = "开设账户" style="height=25px;width=70px">
    			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    			<button style="height=25px;width=70px" onclick="back('${client.idcardNo}');">返回</button>
    		</div>
	    </form>
    	
    </div>
  </body>
</html>
